package com.kuang.demo.controller;

import com.kuang.demo.bean.BaseRespVo;
import com.kuang.demo.mapper.RegionMapper;
import com.kuang.demo.service.RegionService;
import com.kuang.demo.vo.RegionVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * Created by 郭浩 on 2020/11/3 14:30
 */
@RestController
@RequestMapping("admin/region")
public class RegionController {

    @Autowired
    RegionService regionService;

    @GetMapping("list")
    public BaseRespVo regionList(){
        List<RegionVO> regionVOList = regionService.regionList();
        return BaseRespVo.ok(regionVOList);
    }
}
